import java.util.HashSet;
import java.util.Objects;
import java.util.Scanner;
import java.util.Set;


public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Set<Student> students = new HashSet<>();

        // 输入4个学生数据
        for (int i = 0; i < 4; i++) {
            String line = scanner.nextLine();
            String[] parts = line.split(" ");
            String id = parts[0];
            String name = parts[1];
            int age = Integer.parseInt(parts[2]);

            // 创建Student对象并添加到集合
            students.add(new Student(id, name, age));
        }

        // 输出集合中的学生信息
        for (Student student : students) {
            System.out.println(student);
        }
    }
}
class Student {
    private String id;
    private String name;
    private int age;

    // 构造方法
    public Student(String id, String name, int age) {
        this.id = id;
        this.name = name;
        this.age = age;
    }

    // Getter和Setter方法
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    // 重写equals方法，根据id判断两个Student是否相等
    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null || getClass() != obj.getClass()) return false;
        Student student = (Student) obj;
        return Objects.equals(id, student.id);
    }

    // 重写hashCode方法，确保相同id的Student对象有相同的哈希码
    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

    // 重写toString方法，方便输出
    @Override
    public String toString() {
        return id + ":" + name + ":" + age;
    }
}
